public class Channel {

	public String name;
	
    public boolean isBusy;
    
    public Node occupiedNode;
    
    public Channel(String aName) {
    	name = aName;
    }
    
    public String toString() {
    	if (isBusy) {
    		return name + " is occupied by " + occupiedNode.name;
    	} else {
    		return name + " is not occupied";
    	}
    }
    
    @Override
    public boolean equals(Object obj) {
    	Channel other = (Channel) obj;
    	return name.equals(other.name);// TODO Auto-generated method stub
    }
    
    @Override
    public int hashCode() {
    	// TODO Auto-generated method stub
    	return name.hashCode();
    }
}
